<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="步骤5：注册SQL Server数据库">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="sql-0012.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="sql-0017">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>步骤5：注册SQL Server数据库</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="sql-0017"></a><a name="sql-0017"></a>

<h1 class="topictitle1">步骤5：注册SQL Server数据库</h1>
<div><p>当SQL Server数据库所在主机安装客户端后，<span>OceanProtect</span>会自动发现SQL Server数据库主机，您需要在管理界面注册数据库，以对其进行保护。</p>
<div class="section"><h4 class="sectiontitle">注册SQL Server单实例</h4><ol><li><span>选择<span class="uicontrol" id="sql-0017__zh-cn_topic_0000002199964685_uicontrol114088356363">“<span id="sql-0017__zh-cn_topic_0000002199964685_text1840913533616">保护</span> &gt; 数据库 &gt; SQL Server”</span>。</span></li><li><span>选择<span class="uicontrol">“<span>实例</span>”</span>页签。</span></li><li><span>单击<span class="uicontrol">“<span>注册</span>”</span>，注册SQL Server。</span></li><li><span><span class="uicontrol">“<span>类型</span>”</span>选择<span class="uicontrol">“<span>单实例</span>”</span>。</span></li><li><span>配置数据库实例及其认证信息。</span><p><p>相关参数说明如<a href="#sql-0017__zh-cn_topic_0000001311214069_table241515964115">表1</a>所示。</p>

<div class="tablenoborder"><a name="sql-0017__zh-cn_topic_0000001311214069_table241515964115"></a><a name="zh-cn_topic_0000001311214069_table241515964115"></a><table cellpadding="4" cellspacing="0" summary="" id="sql-0017__zh-cn_topic_0000001311214069_table241515964115" frame="border" border="1" rules="all"><caption><b>表1 </b>SQL Server单实例注册信息</caption><colgroup><col style="width:48.18%"><col style="width:51.82%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="48.18%" id="mcps1.3.2.2.5.2.2.2.3.1.1"><p>参数</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.82%" id="mcps1.3.2.2.5.2.2.2.3.1.2"><p>说明</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p id="sql-0017__p157991143121110">SQL Server网络名称</p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p>当SQL Server实例为单机时，SQL Server网络名称默认为Windows主机名。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p id="sql-0017__zh-cn_topic_0000001311214069_p0414115904113">实例名称</p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p><span style="color:#282B33;">实例名称需要与生产环境的实例名称保持一致，生产环境默认名称为MSSQLSERVER。</span></p>
<p>实例名称查询方式如下：</p>
<ol type="a"><li>登录SQL Server数据库主机。</li><li>进入Sql Server Configuration Manager管理界面。</li><li>在服务中查看SQL Server（<em>实例名称</em>）。</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p><span>主机</span></p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p>选择已注册的数据库主机。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p><span>认证方式</span></p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p>支持选择“OS认证”和“数据库认证”，可选择其中任意一种认证方式，配置后<span>OceanProtect备份一体机</span>将通过该方式登录数据库。</p>
<ul><li>OS认证：基于操作系统的认证。</li><li>数据库认证：通过数据库管理员用户名和数据库管理员密码进行认证。</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p><span>数据库用户名</span></p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p>当认证方式选择为“数据库认证”时，展示该参数。</p>
<p>数据库的管理员用户名称。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="48.18%" headers="mcps1.3.2.2.5.2.2.2.3.1.1 "><p><span>数据库密码</span></p>
</td>
<td class="cellrowborder" valign="top" width="51.82%" headers="mcps1.3.2.2.5.2.2.2.3.1.2 "><p>当认证方式选择为“数据库认证”时，展示该参数。</p>
<p>数据库管理员用户的密码。</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li><span>单击<span class="uicontrol">“确定”</span>。</span></li></ol>
</div>
<div class="section"><h4 class="sectiontitle">注册SQL Server集群实例</h4><p><strong>前提条件</strong></p>
<div class="p">注册SQL Server集群实例前，由于采用主节点备份，不支持备节点Copy Only备份方式，所以请确保集群中每个数据库主机已进行注册。<div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>要求集群中所有节点的数据同步。</p>
</div></div>
</div>
<p><strong>操作步骤</strong></p>
<ol><li><span>创建集群。</span><p><ol type="a"><li>在SQL Server页面选择<span class="uicontrol">“<span>集群</span>”</span>页签。</li><li>单击<span class="uicontrol">“<span>注册</span>”</span>。</li><li>在<span class="uicontrol">“<span>注册</span>”</span>页面，自定义集群名称，并选择集群节点。</li><li>单击<span class="uicontrol">“确定”</span>。</li></ol>
</p></li><li><span>注册集群实例。</span><p><ol type="a"><li>在SQL Server页面选择<span class="uicontrol">“<span>实例</span>”</span>页签。</li><li>单击<span class="uicontrol">“<span>注册</span>”</span>。</li><li><span class="uicontrol">“<span>类型</span>”</span>选择<span class="uicontrol">“<span>集群实例</span>”</span>。</li><li>配置数据库实例及其认证信息。<p>相关参数说明如<a href="#sql-0017__table163871610417">表2</a>所示。</p>

<div class="tablenoborder"><a name="sql-0017__table163871610417"></a><a name="table163871610417"></a><table cellpadding="4" cellspacing="0" summary="" id="sql-0017__table163871610417" frame="border" border="1" rules="all"><caption><b>表2 </b>SQL Server集群实例注册信息</caption><colgroup><col style="width:25.629999999999995%"><col style="width:74.37%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25.629999999999995%" id="mcps1.3.3.5.2.2.1.4.2.2.3.1.1"><p>参数</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="74.37%" id="mcps1.3.3.5.2.2.1.4.2.2.3.1.2"><p>说明</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p>SQL Server网络名称</p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><ul><li>当SQL Server实例为AlwaysOn可用性组时，SQL Server网络名称默认为Windows主机名。</li><li>当SQL Server实例为Windows Server 故障转移群集（WSFC集群）时，SQL Server网络名称为搭建WSFC集群时自定义的SQL Server Network Name取值。<p>SQL Server Network Name查询方式如下：</p>
<ol><li>登录集群下任意SQL Server数据库主机。</li><li>使用数据库管理员账户登录Microsoft SQL Server Management Studio。</li><li>选中主机，右键选择“Properties”</li><li>在弹出的Server Properties界面中查询Name参数取值。</li></ol>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p>实例名称</p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p><span style="color:#282B33;">实例名称需要与生产环境的实例名称保持一致，生产环境默认名称为MSSQLSERVER。</span></p>
<p>实例名称查询方式如下：</p>
<ol><li>登录SQL Server数据库主机。</li><li>进入Sql Server Configuration Manager管理界面。</li><li>在服务中查看SQL Server（<em>实例名称</em>）。</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p><span>集群</span></p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p>选择已注册的数据库集群。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p><span>节点</span></p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p>数据库实例所在的主机。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p><span>认证方式</span></p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p>支持选择“OS认证”和“数据库认证”。</p>
<ul><li>OS认证：基于操作系统的认证。</li><li>数据库认证：通过数据库管理员用户名和数据库管理员密码进行认证。</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p><span>数据库用户名</span></p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p>当认证方式选择为“数据库认证”时，展示该参数。</p>
<p>数据库的管理员用户名称。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.1 "><p><span>数据库密码</span></p>
</td>
<td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.3.5.2.2.1.4.2.2.3.1.2 "><p>当认证方式选择为“数据库认证”时，展示该参数。</p>
<p>数据库管理员用户的密码。</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li>单击<span class="uicontrol">“确定”</span>。</li></ol>
</p></li></ol>
</div>
<div class="section"><h4 class="sectiontitle">相关操作</h4><ul><li>若集群类型为WSFC集群时，选择节点时需要选择所有节点。<p><span><img src="zh-cn_image_0000002200006273.png"></span></p>
</li><li>若集群类型为可用性组时，需要将集群的每个节点，逐一注册为集群实例。<p><span><img src="zh-cn_image_0000002164765250.png"></span></p>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="sql-0012.html">备份SQL Server数据库</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>